
%\documentclass[letterpaper,12pt]{article}
%\usepackage[x11names,rgb]{xcolor}
%\usepackage{tikz}
%\usetikzlibrary{snakes}
%\usetikzlibrary{arrows}
%\usetikzlibrary{shapes}
%\usetikzlibrary{backgrounds}
%\usepackage{amsmath}
%\oddsidemargin 0in
%\evensidemargin 0in
%\topmargin 0in
%\headheight 0in
%\headsep 0in
%\textheight 9in
%\textwidth 6.5in
%\begin{document}
%\pagestyle{empty}
%\vspace*{\fill}
%\begin{center}
\documentclass{article}
 
\usepackage[pdftex,active,tightpage]{preview}
\usepackage{tikz}
\usetikzlibrary{snakes}
\usetikzlibrary{arrows}
\makeatletter
 
\begin{document}
\begin{preview}
	%%
	\begin{tikzpicture}[scale=0.8]
				%% draw regular grid
				\draw[gray!60, very thin, step=0.5cm] (0,0) grid (8,8);
				
				%% Now draw the octree ...
				\draw[black, thin, step=4cm] (0,0) grid (8,8);
				\draw[black, thin, step=2cm] (0,0) grid (4,4);
				\draw[black, thin, step=2cm] (4,4) grid (8,8);
				\draw[black, thin, step=1cm] (2,0) grid +(2,2);
				
				%% label them ...
				\draw (1,1) node {$a$} 
							(2.5,0.5) node {$b$} 
							(3.5,0.5) node {$c$} 
							(2.5,1.5) node {$d$} 
							(3.5,1.5) node {$e$} 
							(1,3) node {$f$}
							(3,3) node {$g$}
							(6,2) node {$h$} 
							(2,6) node {$i$} 
							(5,5) node {$j$} 
							(7,5) node {$k$} 
							(5,7) node {$l$} 
							(7,7) node {$m$}  ;
		 		
				\end{tikzpicture} %%
\end{preview}
\end{document}

%\end{center}
%\vspace*{\fill}
%\end{document}
			